﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GmepPreviewControl.h"
#include <deque>

class CQmodel;
namespace ggp
{
    class CVisualNode;
    class CViewer;
    class CColor;
}

namespace gcmp
{
    class IFamilyFile;   
}
namespace gmep
{
    class GMEP_PREVIEW_CONTROL_EXPORT PreviewControlInterface
    {
    public:
        PreviewControlInterface(HWND hWnd);
        ~PreviewControlInterface();       

        bool LoadQmdFile(const std::wstring &fileName, int &errorStats);
        bool LoadGacFile(const std::wstring &fileName, int &errorStats);
        bool LoadGacFile(const std::wstring &fileName, int &errorStats, const std::wstring &paramName);
        bool LoadQmodel(CQmodel& qmdModel);
        void ClearSceneNode();
    private:
        ggp::CVisualNode* BuildSceneNodes();
        void Initialize();
        void split(const std::wstring &s, TCHAR delim, std::vector<std::wstring> &elems);

    private:
        gcmp::OwnerPtr<ggp::CViewer> m_viewer;
    };
}